obj-m := BMP280.o
KDIR := /home/zheng1/Desktop/rk3399/kernel-release-4.4-rockpi4
cross_compile := aarch64-linux-gnu-
arch := arm64

all :
	make -C  $(KDIR) M=$(PWD) modules ARCH=$(arch) CROSS_COMPILE=$(cross_compile)
	scp BMP280.ko rock@192.168.31.95:/home/rock

app :
	$(cross_compile)gcc bmp_read.c -o bmp_read
	scp bmp_read rock@192.168.31.95:/home/rock


clean :
	rm -rf $(obj-m) .bmp280_* *.symvers *.order *.mod.* *.ko .BMP280.* bmp_read